[LINUX][PAE] Improve allocation strategy when PAE pgdirs must be below 4GB.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 14 Jun 2006 11:36:06 +0000 (12:36 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 14 Jun 2006 11:36:06 +0000 (12:36 +0100)
commite2f381e315c5d55f3f5823e204eccb8ac675aa80
treeda6e77889add750e5761d3fe8c99859de48facba
parentbe252f5f66e6ca2a7755a004361685ec341b7089
[LINUX][PAE] Improve allocation strategy when PAE pgdirs must be below 4GB.
Moving the re-allocation to low memory into pgd_alloc() has several
advantages:
 1. Avoids race with save/restore where pgdir may end up above 4GB after
    save/restore.
 2. If pgdir cannot be re-allocated we can return failure to the caller
    rather than BUG().
 3. Slightly reduces diff against native Linux code.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/i386/mm/init-xen.c
linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c